<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script>
       var temp;
       var apple1 = '青苹果';
       var apple2 = '红苹果';
       temp = apple1;
       apple1 = apple2;
       apple2 = temp;
       console.log(apple1); //输出结果:红苹果
       console.log(apple2); //输出结果：青苹果
    </script>
</head>
<body>

</body>
</html>